import ajax from '../utils/request'

// 添加文章评论
export const addComment = (articleId, content) => {
  return ajax({
    method: 'POST',
    url: '/app/v1_0/comments',
    data: {
      target: articleId,
      content
    }
  })
}

// 获取评论
export const getComment = (articleId, offset) => {
  return ajax({
    method: 'GET',
    url: '/app/v1_0/comments',
    params: {
      type: 'a',
      source: articleId,
      offset
    }
  })
}
